<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<meta charset="UTF-8">
<title>个人帖库</title>
<link rel="icon" type="image/x-icon">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<body>
<!--样式资源-->
<div th:insert="base/style :: style"></div>
<!--样式资源-->

<!--nav导航-->
<div th:insert="base/nav :: nav"></div>
<!--nav导航-->
<!--hidden-->
<div th:insert="base/hidden :: hidden"></div>
<!--hidden-->
<!--内容部分-->
<div id="content"  style="padding-bottom: 30px">
    <div class="page-header">
        <div class="row">
            <div class="col-md-2">
                <h4 style="color: #363636;font-size: 20px;font-style: italic;margin-left: 20px">&nbsp;&nbsp;&nbsp;个人栏目<small></small></h4>
                <div class="col-md-4">
                    <ul style="margin-top: 10px;margin-left: 30px">
                        <li><a style="text-decoration: none;color: #464646" onclick="skip_to(PUBLISH_INDEX,'')" class="btn"><i class="icon-edit" style="color: grey"></i>&nbsp;我要发帖</a></li>
                        <li th:if="${session.id} != null"><a style="text-decoration: none;color: #464646" onclick="skip_to(COLLECTION_INDEX,'')" class="btn"><i class="icon-star" style="color: grey"></i>&nbsp;收藏/关注</a></li>
                        <li th:if="${session.id} != null"><a style="text-decoration: none;color: #464646" onclick="skip_to(REPO_INDEX,'')" class="btn"><i class="icon-cloud" style="color: grey"></i>&nbsp;个人帖库</a></li>
                    </ul>
                </div>
            </div>

            <div class="col-md-8" id="post_list">
                <h4 style="font-size: 20px;font-style: italic"><i class="icon-hdd"></i>&nbsp;个人帖库<small></small></h4>
                <div class="col-md-12">
                    <div class="row" style="margin-top: 5px">
                        <ul class="layui-timeline" id="repo">
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--页脚-->
<div th:insert="base/footer :: footer"></div>
<!--页脚-->
<script th:src="@{/load.js}"></script>
<script>
    load_posts("#repo",USER_POSTS_OK,SUM_USER_POST_OK,UID,"");
    /**
     * 回收
     * @param id
     */
    function lay_trash(id) {
        layui.use('layer',function () {
            let index = layer.load(2);
            let obj = putData(UPDATE_POST_STATUS,'?id='+id+'&status=回收');
            console.log(obj)
            if(obj.data !== 0){
                layer.close(index);
                layer.msg("已放进回收站！");
                location.reload(true);
            }else {
                layer.close(index);
                layer.msg("操作失败,请尝试！")
            }
        });
    }
</script>
</body>
</html>